﻿@model SendPrivateMessageModel
@using Nop.Web;
@using Nop.Web.Extensions;
@using Nop.Web.Models.PrivateMessages;
@{    
    Layout = "~/Views/Shared/_Root.cshtml";

    Html.AddTitleParts(T("PageTitle.SendPM").Text);
}
@using (Html.BeginForm())
{
    <div class="privatemessagesend">
        <div class="page-title">
            <h1>@T("PrivateMessages.Send.PostMessage")</h1>
        </div>
        <div class="wrapper">
            <div class="message-error">
                @Html.ValidationSummary(true)
            </div>
            @Html.HiddenFor(model => model.ToCustomerId)
            @Html.HiddenFor(model => model.ReplyToMessageId)
            <div class="clear">
            </div>
            <div class="postmessage">
                <div>
                    @T("PrivateMessages.Send.To") 
                    @if (Model.AllowViewingToProfile)
                    {
                                <a href="@Url.RouteUrl("CustomerProfile", new { id = Model.ToCustomerId })">@(Model.CustomerToName)</a>
                    }
                    else
                    {
                               @Model.CustomerToName
                    }
                </div>
                <div>
                    @T("PrivateMessages.Send.Subject")
                    @Html.TextBoxFor(model => model.Subject, new { @class = "pmtitletext" })
                        @Html.ValidationMessageFor(model => model.Subject)
                </div>
                <div>
                    @T("PrivateMessages.Send.Message")
                    @Html.TextAreaFor(model => model.Message)
                    @Html.ValidationMessageFor(model => model.Message)
                </div>
                <div class="options">
                    <input type="submit" value="@T("PrivateMessages.Send.SendButton")" data-inline="true" />
                    <a href="@Url.RouteUrl("PrivateMessages")" data-role="button" data-inline="true">@T("PrivateMessages.Send.CancelButton")</a>
                </div>
            </div>
        </div>
    </div>
}